home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 027a / nftinf.zip / NFRFC.TXT < prev   
Text File  |  1991-04-01  |  47KB  |  1,161 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.      NANFOR.LIB Working Group                         G. Scott [71620,1521]
  8.      Request for Comments                                              UCLA
  9.      Version 1.0                                                April, 1991
  10.  
  11.                         THE NANFORUM TOOLKIT (NANFOR.LIB)
  12.               PUBLIC DOMAIN USER SUPPORTED CLIPPER FUNCTION LIBRARY
  13.  
  14.      1    INTRODUCTION
  15.  
  16.           This is a standard for establishing and maintaining NANFOR.LIB, a
  17.           public-domain, user-supported library of functions designed to
  18.           interface with Nantucket Clipper, version 5.0, and later.  You
  19.           are encouraged to read it over and forward comments to Glenn
  20.           Scott, CIS ID [71620,1521].
  21.  
  22.           1.1  History
  23.  
  24.                In October and November of 1990, a discussion on the   
  25.                evolution of third-party products, vendors, and marketing
  26.                took place on the CompuServe Information Service's Nantucket
  27.                Forum (NANFORUM).  During this discussion, a NANFORUM
  28.                subscriber named Alexander Santic suggested the idea of a
  29.                user-supported Clipper function library, available to all on
  30.                the CompuServe Information Service (CIS).  A number of
  31.                subscribers, including several Clipper third party
  32.                developers, and some Nantucket employees, expressed their
  33.                support. This standard is a first step toward organizing
  34.                such an endeavor.
  35.  
  36.           1.2  Trademarks
  37.  
  38.                Clipper is a registered trademark of Nantucket Corporation.  
  39.  
  40.           1.3  Relationship to Nantucket and third party
  41.  
  42.                NANFOR.LIB is a project independent of any third party
  43.                developer or Nantucket Corporation.  There is no official
  44.                "sanction" or "seal of approval" from Nantucket of any kind. 
  45.                In addition, NANFOR.LIB routines will be accepted and
  46.                included without regard for whether or not routines
  47.                performing a similar function are included in a commercial
  48.                third party or Nantucket product.
  49.  
  50.                It is desired that NANFOR.LIB not compete with third party
  51.                products but rather fill in the holes in Clipper's standard
  52.                library.  However, there will be some overlap into
  53.                commercial third-party library functions, so it would be
  54.                best if this is never taken into consideration when deciding
  55.                on including a particular function.
  56.  
  57.                Developers submitting NANFOR.LIB routines can and will be
  58.                corporate developers, third party developers, independent
  59.                consultant / programmers, hobbyists, and other Clipper
  60.  
  61.  
  62.      Scott                                                         [Page 1]
  63.  
  64.  
  65.  
  66.  
  67.  
  68.      RFC:  NANFOR.LIB                                           April, 1991
  69.      Ver: 1.0                                          The NANFORUM Toolkit
  70.  
  71.  
  72.                people.  Perhaps even Nantucket employees will contribute. 
  73.                No one is excluded or included due to any particular
  74.                affiliation.
  75.  
  76.                Nantucket employees submitting functions are doing so as
  77.                individuals, and are not making a policy of involving
  78.                Nantucket in the project, nor are they committing Nantucket
  79.                to supporting the public domain library.
  80.  
  81.           1.4  Clipper version supported
  82.  
  83.                NANFOR.LIB functions, no matter what language they are  
  84.                written in, will be designed to work with Clipper version
  85.                5.0 and later.  Many of the functions, particularly those
  86.                that use the EXTEND system, will be compatible with the
  87.                Summer 1987 version of Clipper. However, ensuring Summer 87
  88.                compatibility will be the responsibility of the user.  If a
  89.                user wants a function to work with Summer 87, she will have
  90.                to modify the code herself if necessary.  In many cases,
  91.                this is a trivial task.
  92.  
  93.           1.5  Queries from new users
  94.  
  95.                Queries from new users interested in finding NANFOR.LIB will
  96.                be handled in a uniform and courteous way.  A short text
  97.                file will be created that will briefly explain NANFOR.LIB,
  98.                who the current people maintaining it are, and how to get a
  99.                hold of it.  This text message will be sent in response to
  100.                any query.  TAPCIS users will find this method very easy to
  101.                implement.
  102.  
  103.      2    DISTRIBUTION
  104.  
  105.           2.1  Public Domain
  106.  
  107.                NANFOR.LIB, its source code, and documentation will be
  108.                public-domain software.  It is not for "sale", and shall not
  109.                be sold.  No fee or contribution of any kind will be
  110.                required for anyone wanting a copy, other than what they
  111.                would normally pay to download it from CompuServe. Users
  112.                will be encouraged to submit functions via CompuServe.
  113.  
  114.           2.2  Official repository
  115.  
  116.                It is possible that copies of NANFOR.LIB will be downloaded
  117.                and distributed elsewhere.  That is all right, but the only
  118.                copy of NANFOR.LIB and all associated documentation that
  119.                will be maintained by volunteers is in an appropriate
  120.                library on the CIS Nantucket Forum.
  121.  
  122.  
  123.      Scott                                                         [Page 2]
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      RFC:  NANFOR.LIB                                           April, 1991
  130.      Ver: 1.0                                          The NANFORUM Toolkit
  131.  
  132.  
  133.                2.2.1     Contents
  134.  
  135.                          The nature of the official posting on CompuServe
  136.                          shall be:
  137.  
  138.                     2.2.1.1   NFLIB.ZIP
  139.  
  140.                               This will contain the files NANFOR.LIB
  141.                               (library), and NANFOR.NG (Norton Guide).
  142.  
  143.                     2.2.1.2   NFSRC.ZIP
  144.  
  145.                               This will contain all the library source
  146.                               code, makefile, and other source-code related
  147.                               materials.
  148.  
  149.                     2.2.1.3   FTINQ.TXT
  150.  
  151.                               This is a short text file used as a response
  152.                               to new user queries (see paragraph 1.5)
  153.  
  154.                     2.2.1.4   NFRFC.ZIP
  155.  
  156.                               This contains an ASCII copy of NANFOR.RFC
  157.                               (this document) named NFRFC.TXT.
  158.  
  159.                     2.2.1.5   NFHDRS.ZIP
  160.  
  161.                               This contains templates of the file and
  162.                               documentation header blocks, including a
  163.                               sample, for prospective authors (FTHDR.PRG,
  164.                               FTHDR.ASM, FTHDR.SAM)
  165.  
  166.  
  167.      3    POLICY ON INCLUDING FUNCTIONS
  168.  
  169.           3.1  "Best Function"
  170.  
  171.                It is possible that more than one developer will submit a
  172.                function or package of functions that perform substantially
  173.                the same services.  In that event, the referees will choose
  174.                one to be included based on power, functionality,
  175.                flexibility, and ease of use.  Due to the cooperative,
  176.                non-commercial nature of the library, no one's feelings
  177.                should be hurt by excluding duplicate functions.
  178.  
  179.                In addition, it is possible that two substantially   
  180.                similar functions or packages will benefit from merging them
  181.                together to provide new functionality.  This will be the
  182.  
  183.  
  184.      Scott                                                         [Page 3]
  185.  
  186.  
  187.  
  188.  
  189.  
  190.      RFC:  NANFOR.LIB                                           April, 1991
  191.      Ver: 1.0                                          The NANFORUM Toolkit
  192.  
  193.  
  194.                prerogative of the referees (see paragraph 6.3), in close
  195.                consultation with the authors.
  196.  
  197.           3.2  Public Domain
  198.  
  199.                Each author submitting source code must include as part  of
  200.                that code a statement that this is an original work and that
  201.                he or she is placing the code into the public domain. The
  202.                librarian (see paragraph 6.1) and referees should make a
  203.                reasonable effort to be sure no copyrighted source code,
  204.                such as that supplied with some third party libraries, makes
  205.                it into NANFOR.LIB.  However, under no circumstances will
  206.                the librarian, referees, or any other party other than the
  207.                submitter be responsible for copyrighted code making it into
  208.                the library accidentally.
  209.  
  210.           3.3  Source code 
  211.  
  212.                Full source code must be provided by the author for every
  213.                routine to be included in NANFOR.LIB.  No routine, no matter
  214.                what language, will be put into the library on the basis of
  215.                submitted object code.
  216.  
  217.           3.4  Proper submission
  218.  
  219.                Due to the volume of submissions expected, librarians and
  220.                referees may not have the time to fix inconsistencies in
  221.                documentation format, function naming, and other
  222.                requirements.  Therefore, the librarian shall expect source
  223.                code to arrive in proper format before proceeding further
  224.                with it.
  225.  
  226.           3.5  Quality and perceived usefulness
  227.  
  228.                In a cooperative effort like this, it is very difficult to
  229.                enforce some standard of quality and/or usefulness.  For
  230.                example, a package of functions to handle the military's
  231.                "Zulu time" may be very useful to some, and unnecessary to
  232.                others.
  233.  
  234.                The Nanforum Toolkit will by its very nature be a hodgepodge
  235.                of routines, some of very high quality, some not so high. 
  236.                It is up to the users to improve it.  It will be complete in
  237.                some areas and vastly inadequate in others.  It is up to the
  238.                users to fill in the holes.  
  239.  
  240.                We shall err on the side of including "questionable"
  241.                functions, provided they seem to work.  Debates on the
  242.  
  243.  
  244.  
  245.      Scott                                                         [Page 4]
  246.  
  247.  
  248.  
  249.  
  250.  
  251.      RFC:  NANFOR.LIB                                           April, 1991
  252.      Ver: 1.0                                          The NANFORUM Toolkit
  253.  
  254.  
  255.                quality of the library's source code shall be encouraged and
  256.                will take place in the proper message section of NANFORUM.
  257.  
  258.      4    LIBRARY MAINTENANCE PROCEDURE
  259.  
  260.           4.1  Selection procedure
  261.  
  262.                Source code will be submitted to the librarian, the
  263.                documenter (see paragraph 6.2), or one of the referees. 
  264.                Code will be added if it has been reviewed, and approved by
  265.                at least two referees. 
  266.  
  267.                Code not meeting the documentation or source code formatting
  268.                standards will generally be returned to the author with
  269.                instructions.
  270.  
  271.                When the referees have finished selecting a function,  they
  272.                will compile it and submit both source and .OBJ to the
  273.                librarian who shall add the .OBJ(s) into the library.  
  274.  
  275.                Every effort should be made to make sure that the C and ASM
  276.                functions are reviewed by referees with suitable C and ASM
  277.                experience.
  278.  
  279.           4.2  Update interval
  280.  
  281.                As new functions are submitted, they will added to the
  282.                library, and the documentation updated.  However, the 
  283.                library will only be updated at a fixed interval.
  284.  
  285.                This interval is currently set at: QUARTERLY.  After the
  286.                initial release, updates occur on or around April 1, July 1,
  287.                October 1, January 1, etc.  Of course, these dates are never
  288.                guaranteed, and there is always an honorary release date of
  289.                September 15, which will always be missed.
  290.  
  291.                If there are some very important functions that have been
  292.                added, and the next update interval is, say, two months
  293.                away, the librarian, documenter, and referees will release a
  294.                maintenance update anyway, regardless of update intervals.
  295.  
  296.           4.3  Version control
  297.  
  298.                NANFOR.LIB will use a numeric version number as follows:
  299.  
  300.                The major version will be numeric, starting from 1.    This
  301.                will change with each quarterly update.  The minor version
  302.                will change with each bug fix.  This will start  with zero
  303.  
  304.  
  305.  
  306.      Scott                                                         [Page 5]
  307.  
  308.  
  309.  
  310.  
  311.  
  312.      RFC:  NANFOR.LIB                                           April, 1991
  313.      Ver: 1.0                                          The NANFORUM Toolkit
  314.  
  315.  
  316.                and continue until the next major update, at which point it
  317.                will revert to zero again.
  318.  
  319.                Typical version numbers might be 1.1, 2.12, 15.2, etc.
  320.  
  321.                The .LIB file, and all associated files, will carry a
  322.                day/time stamp of the first day of the particular release's
  323.                quarter.  The file date shall correspond to the version
  324.                number (i.e., 1:03am is version 1.3).
  325.  
  326.           4.4  Announcing updates
  327.  
  328.                As the library and its associated documentation are updated,
  329.                simple announcements will be posted on NANFORUM.  This is
  330.                the only place where an update shall be announced.  An
  331.                update will be announced after it has been successfully
  332.                uploaded to the appropriate library on CompuServe.
  333.  
  334.           4.5  Bug reports and fixes
  335.  
  336.                The librarian will correlate and verify all bug reports,
  337.                with the help of the referees.  If the referees believe a
  338.                bug to be serious, they will fix it and the librarian will
  339.                release a maintenance upgrade immediately.  If they consider
  340.                it a minor bug, they will fix it but wait for the next
  341.                scheduled upgrade to release it.  In this case, a bug fix
  342.                may be released as a "Patch."
  343.  
  344.                4.5.1     Patches
  345.  
  346.                          A "patch" is simply an ASCII text file containing
  347.                          instructions for editing the source code to a
  348.                          misbehaving function or group of functions. 
  349.                          Patches may appear in the CIS library before a
  350.                          maintenance release or quarterly upgrade.  A patch
  351.                          file will have a name of the form
  352.  
  353.                               PATn.ZIP
  354.  
  355.                          where <n> is a number starting from 1.  Patches
  356.                          will be numbered sequentially. Patches will be
  357.                          deleted every time a new version of NANFOR.LIB
  358.                          goes on-line.
  359.  
  360.                          A patch zipfile may optionally contain .OBJ files
  361.                          to be replaced in user libraries via a LIB
  362.                          utility.
  363.  
  364.           4.6  Technical Support
  365.  
  366.  
  367.      Scott                                                         [Page 6]
  368.  
  369.  
  370.  
  371.  
  372.  
  373.      RFC:  NANFOR.LIB                                           April, 1991
  374.      Ver: 1.0                                          The NANFORUM Toolkit
  375.  
  376.  
  377.                Technical support will work just as any technical subject on
  378.                NANFORUM works.  Users will post questions and suggestions
  379.                to a particular message area or thread,  and anyone who
  380.                knows the answer should respond.  No one is obliged to
  381.                answer, but it is considered good form to respond with
  382.                something, even if one doesn't know the answer.
  383.  
  384.                Support will include help on recompiling the routines or
  385.                modifying the source.  
  386.  
  387.           4.7  Linker Compatibility
  388.  
  389.                In order to assist users of Clipper third party linkers
  390.                (such as WarpLink or Blinker), NANFOR.LIB may need to broken
  391.                up into root and overlay sections.  How this will be done
  392.                will be determined when splitting becomes necessary.
  393.  
  394.           4.8  Splitting NANFOR.LIB by functional category
  395.  
  396.                It is possible that at some future date, it will make sense
  397.                to split NANFOR.LIB into separate functional areas (e.g.,
  398.                video routines vs. date routines, etc).  This RFC will be
  399.                modified accordingly should that need arise.  
  400.  
  401.  
  402.      5    FUNCTION CODING STANDARDS
  403.  
  404.           The goal of this standard is not to force anyone to rewrite his
  405.           code for this library, but to create some consistency among the
  406.           functions so that they may more easily maintained and understood
  407.           by all Clipper developers, both novice and advanced.
  408.  
  409.           However, it is extremely important that anyone submitting code
  410.           attach the proper headers and documentation and fill them out
  411.           correctly.  This will make it much easier for code to be added to
  412.           the library.
  413.  
  414.           5.1  Required sections for each function
  415.  
  416.                5.1.1     Header (author name/etc, version ctrl info)
  417.  
  418.                          Figure 1 shows a header that must be included at
  419.                          the top of every piece of source code submitted to
  420.                          the library.  This header will work with both
  421.                          Clipper and C code.  For ASM code, substitute each
  422.                          asterisk ("*") with a semicolon (";") and delete
  423.                          the slashes ("/").
  424.  
  425.  
  426.  
  427.  
  428.      Scott                                                         [Page 7]
  429.  
  430.  
  431.  
  432.  
  433.  
  434.      RFC:  NANFOR.LIB                                           April, 1991
  435.      Ver: 1.0                                          The NANFORUM Toolkit
  436.  
  437.  
  438.  
  439.  
  440.                                      /*
  441.                                       * File......: 
  442.                                       * Author....:      [CIS: x,x]
  443.                                       * Date......: $Date$
  444.                                       * Revision..: $Revision$
  445.                                       * Log file..: $Logfile$
  446.                                       * 
  447.                                       * 
  448.                                       * Modification history:
  449.                                       * ---------------------
  450.                                       *
  451.                                       * $Log$
  452.                                       *
  453.                                       */
  454.  
  455.                                    Figure 1 - Standard function header
  456.  
  457.                          Note that the date, revision, logfile, and
  458.                          modification history fields will be maintained by
  459.                          the librarian and should not be edited or adjusted
  460.                          by code authors.
  461.  
  462.                          The "File" field shall contain the source file
  463.                          name.  This is often independent of the individual
  464.                          function name.  For example, a function named
  465.                          ft_screen() would be included in SCREEN.PRG.  As a
  466.                          rule, source files (.PRG, .C, .ASM) should not
  467.                          have the "FT" prefix.
  468.  
  469.                          The "Author" field should have the author's full
  470.                          name, and CIS number.  A CIS number is important,
  471.                          as this will make bug fixing and other
  472.                          correspondence easier.
  473.  
  474.  
  475.                5.1.2     Public domain disclaimer
  476.  
  477.                          Authors shall simply state "This is an original
  478.                          work by [Author's name] and is hereby placed in
  479.                          the public domain."
  480.  
  481.                5.1.3     Documentation block ( for .DOC, .NG, .TRH )
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.      Scott                                                         [Page 8]
  490.  
  491.  
  492.  
  493.  
  494.  
  495.      RFC:  NANFOR.LIB                                           April, 1991
  496.      Ver: 1.0                                          The NANFORUM Toolkit
  497.  
  498.  
  499.  
  500.  
  501.                                      /*  $DOC$
  502.                                       *  $FUNCNAME$
  503.                                       *
  504.                                       *  $ONELINER$
  505.                                       *     
  506.                                       *  $SYNTAX$
  507.                                       *
  508.                                       *  $ARGUMENTS$
  509.                                       *
  510.                                       *  $RETURNS$
  511.                                       *
  512.                                       *  $DESCRIPTION$
  513.                                       *
  514.                                       *  $EXAMPLES$
  515.                                       *
  516.                                       *  $SEEALSO$
  517.                                       *
  518.                                       *  $INCLUDE$
  519.                                       *
  520.                                       *  $END$
  521.                                       */
  522.  
  523.  
  524.  
  525.                                    Figure 2 - Standard Documentation Header
  526.  
  527.                          The keywords enclosed in dollar-signs delimit
  528.                          sections of the documentation header analagous to
  529.                          those in Nantucket's Clipper 5.0 documentation. 
  530.                          Documentation should be written in the same style
  531.                          and flavor as the Nantucket material, if possible.
  532.                          Refer to the Clipper documentation for more detail
  533.                          and numerous examples.
  534.  
  535.                          The documentation will appear on comment lines
  536.                          between the keywords.  Examples are optional.  Do
  537.                          not put documentation on the same line as the
  538.                          comment keyword.
  539.  
  540.                          Note that the $DOC$ and $END$ keywords serve as
  541.                          delimiters.  Do not place any text between $DOC$
  542.                          and $FUNCNAME$, or any documentation after the
  543.                          $END$ keyword, unless that documentation belongs
  544.                          in the source code file and not in the NG/TRH
  545.                          file.
  546.  
  547.  
  548.  
  549.  
  550.      Scott                                                         [Page 9]
  551.  
  552.  
  553.  
  554.  
  555.  
  556.      RFC:  NANFOR.LIB                                           April, 1991
  557.      Ver: 1.0                                          The NANFORUM Toolkit
  558.  
  559.  
  560.                          The $FUNCNAME$ keyword should be followed by the
  561.                          function name, with parentheses, and no arguments
  562.                          or syntax, such as:
  563.  
  564.                               $FUNCNAME$
  565.                                    ft_screen()
  566.  
  567.                          Note the indent for readibility.  Parentheses
  568.                          shall be added after the function name as shown
  569.                          above.
  570.  
  571.                          The $ONELINER$ keyword should be followed by a
  572.                          simple statement expressing what the function
  573.                          does, phrased in the form of a command, e.g.:
  574.  
  575.                               $ONELINER$
  576.                                    Sum the values in an array
  577.  
  578.                          The length of the entire $ONELINER$ shall not
  579.                          exceed 60 characters (this is a Norton Guide
  580.                          limitation).
  581.  
  582.                          The $SYNTAX$ keyword should be followed by a
  583.                          Nantucket-standard syntax specifier, such as:
  584.  
  585.                               $SYNTAX$
  586.                                    ft_screen( <nTop> [,<nBottom>] ) -> NIL
  587.  
  588.                          All parameters have proper prefixes (see paragraph
  589.                          5.4), and are enclosed in <angle brackets>. 
  590.                          Optional parameters are enclosed in [square
  591.                          brackets] as well.  An arrow should follow,
  592.                          pointing to the return value.  If there is no
  593.                          return value, it should be NIL.  Any others should
  594.                          be preceded with the proper prefix (see the
  595.                          Clipper documentation).
  596.  
  597.                          The $SEEALSO$ field provides a way to generate
  598.                          cross-references in the Norton Guide help
  599.                          documentation.  Use it to point the user to other
  600.                          related functions in the forum toolkit.  For
  601.                          example, if ft_func1() is also related to
  602.                          ft_func2() and ft_func3(), the field would look
  603.                          like this:
  604.  
  605.                               $SEEALSO$
  606.                                    ft_func2() ft_func3()
  607.  
  608.  
  609.  
  610.  
  611.      Scott                                                        [Page 10]
  612.  
  613.  
  614.  
  615.  
  616.  
  617.      RFC:  NANFOR.LIB                                           April, 1991
  618.      Ver: 1.0                                          The NANFORUM Toolkit
  619.  
  620.  
  621.                          Note that fields are separated by spaces and the
  622.                          parentheses are included.
  623.  
  624.                          The $INCLUDE$ area allows you to specify what
  625.                          files are included by this function (this will be
  626.                          used to organize the on-line help file, and
  627.                          possibly the master makefile).  An example would
  628.                          be 
  629.  
  630.                               $INCLUDE$
  631.                                    int86.ch int86.inc
  632.  
  633.                          Other documenation fields should be self-
  634.                          explanatory.  Review the appendix for a sample. 
  635.                          All fields are required and must be filled in. 
  636.                          Examples should not be considered optional.
  637.  
  638.                5.1.4     Sample header and documentation block
  639.  
  640.                          Refer to the Appendix for a sample header and
  641.                          documentation block.
  642.  
  643.                5.1.5     Test driver
  644.  
  645.                          A test driver is an optional section of C or
  646.                          Clipper code that will only be compiled under
  647.                          certain circumstances.  Developers are encouraged
  648.                          to include a short "test section" in front of
  649.                          their code.
  650.  
  651.                          The test driver shall be surrounded by the  
  652.                          following pre-processor directives, and placed at
  653.                          the top of the source file:
  654.  
  655.                               #ifdef FT_TEST
  656.                                    [test code]
  657.                               #endif
  658.  
  659.                          The test driver is currently optional, but authors
  660.                          submitting Clipper code should seriously consider
  661.                          adding it.  It is a good way to include short
  662.                          demos within a piece of source code, yet pay no
  663.                          penalty because it is only compiled if needed.  It
  664.                          will be invoked when a #define is created that
  665.                          says "#define FT_TEST."  This is a way for
  666.                          submitters to include short test routines with
  667.                          their functions and yet keep it all in one source
  668.                          file.  This will be useful to end users.
  669.  
  670.  
  671.  
  672.      Scott                                                        [Page 11]
  673.  
  674.  
  675.  
  676.  
  677.  
  678.      RFC:  NANFOR.LIB                                           April, 1991
  679.      Ver: 1.0                                          The NANFORUM Toolkit
  680.  
  681.  
  682.                          This test driver may become required in a future
  683.                          version of the RFC.
  684.  
  685.                5.1.6     Code
  686.  
  687.                          The source code shall be formatted as described in
  688.                          paragraph 5.4.
  689.  
  690.           5.2  Function names
  691.  
  692.                All NANFOR.LIB functions start with one of two prefixes. If
  693.                the function is to be called by user programs, than it will
  694.                begin with the prefix 
  695.  
  696.                     FT_      ("F", "T", underscore)
  697.  
  698.                Note that "FT" is a mnemonic for "Forum Toolkit."  If the
  699.                function is "internal" to a module, then it will be prefixed
  700.                by an underscore:
  701.  
  702.                     _FT      ( Underscore, "F", "T" )
  703.  
  704.                with no trailing underscore. Examples:
  705.  
  706.                     FT_CURDIR()            "external"
  707.                     _ftAlloc()             "internal"
  708.  
  709.           5.3  Librarian's authority to change function names
  710.  
  711.                Some functions will be submitted that either (1) bear a
  712.                similar name to another function in the library, or (2) bear
  713.                an inappropriate name.  For example, a function called
  714.                FT_PRINT that writes a character to the screen could be said
  715.                to be named inappropriately, as a name like FT_PRINT implies
  716.                some relationship to a printer.  The librarian shall have
  717.                the responsibility to rename submitted functions for clarity
  718.                and uniqueness.
  719.  
  720.                5.3.1     Changing a function name after it has been
  721.                          released
  722.  
  723.                          Once the library is released with a particular
  724.                          function included, then a function name should
  725.                          generally be frozen and not renamed.  To do so
  726.                          would probably cause difficulties with users who
  727.                          had used the previous name and are not tracking
  728.                          the changes to the library.  
  729.  
  730.           5.4  Source code formatting
  731.  
  732.  
  733.      Scott                                                        [Page 12]
  734.  
  735.  
  736.  
  737.  
  738.  
  739.      RFC:  NANFOR.LIB                                           April, 1991
  740.      Ver: 1.0                                          The NANFORUM Toolkit
  741.  
  742.  
  743.                5.4.1     Clipper
  744.  
  745.                          Clipper code shall be formatted in accordance with
  746.                          Nantucket's currently defined publishing standard. 
  747.                          Although there will surely be some debate over
  748.                          whether this is a good idea, in general, the goal
  749.                          is to provide something consistent that all
  750.                          Clipper developers will recognize.  
  751.  
  752.                          Minor deviations will be permitted.
  753.  
  754.                          The Nantucket standard usually means uppercase
  755.                          keywords, and manifest constants, and lower case
  756.                          everything else.
  757.  
  758.                          In addition, identifiers shall be preceded with
  759.                          the proper metasymbol:
  760.  
  761.                               n    Numeric
  762.                               c    Character or string
  763.                               a    Array
  764.                               l    Logical, or boolean
  765.                               d    Date
  766.                               m    Memo
  767.                               o    Object
  768.                               b    Code block
  769.                               h    Handle
  770.                               x    Ambiguous type
  771.  
  772.                          Refer to the Clipper documentation for samples of
  773.                          Nantucket's code publishing format.
  774.  
  775.                5.4.2     C
  776.  
  777.                          C source code shall be formatted in a generally
  778.                          accepted way, such as Kernighan and Ritchie's
  779.                          style used in the book _The C Programming
  780.                          Language_."  The use of Nantucket's EXTEND.H is
  781.                          encouraged.
  782.  
  783.                5.4.3     ASM
  784.  
  785.                          No particular formatting conventions are required
  786.                          for assembly language source code, since assembly
  787.                          code formatting is fairly standard.  Lowercase
  788.                          code is preferred.  Be sure to include the proper
  789.                          documentation header information, as described
  790.                          above.
  791.  
  792.  
  793.  
  794.      Scott                                                        [Page 13]
  795.  
  796.  
  797.  
  798.  
  799.  
  800.      RFC:  NANFOR.LIB                                           April, 1991
  801.      Ver: 1.0                                          The NANFORUM Toolkit
  802.  
  803.  
  804.                          Do not place ASM code in DGROUP.  See paragraph
  805.                          5.12.
  806.  
  807.           5.5  Organization into .PRGs
  808.  
  809.                Since many different people will be submitting routines, it
  810.                is probably best if all routines that belong together are
  811.                housed in the same .PRG.  If there is some reason to split
  812.                the .PRG, the referees and the librarian will handle that as
  813.                part of library organization.
  814.  
  815.           5.6  Header files
  816.  
  817.                Including a ".ch" or ".h" or ".inc" with each function would
  818.                get unwieldy.  For the purpose of NANFOR.LIB, all #defines,
  819.                #ifdefs, #commands, #translates, etc that belong to a
  820.                particular source file shall be included at the top of that
  821.                source file.  Since few submissions will split over multiple
  822.                source files, there will usually be no need to #include a
  823.                header in more than one place.
  824.  
  825.                If a "ch" file will make the end user's job of supplying
  826.                parameters and other information to NANFOR.LIB functions
  827.                easier, then it shall be submitted as a separate entity. 
  828.                The referees will decide on whether to include these
  829.                directives in a master NANFOR.CH file.
  830.  
  831.           5.7  Clipper 5.0 Lexical Scoping
  832.  
  833.                NANFOR.LIB routines that are written in Clipper will make
  834.                use of Clipper 5.0's lexical scoping features to insulate
  835.                themselves from the rest of the user's application.
  836.  
  837.                For example, all "privates" shall generally be declared
  838.                "local."  
  839.  
  840.                If a package of Clipper functions is added to the library,
  841.                then the lower-level, support functions will be declared
  842.                STATIC as necessary.
  843.  
  844.           5.8  Use of Publics
  845.  
  846.                Authors shall not use PUBLIC variables in NANFOR.LIB
  847.                functions, due to the potential interference with an
  848.                end-user's application or vice versa.  
  849.  
  850.                If a global is required for a particular function or package
  851.                of functions, that global shall be accessed through a
  852.                function call interface defined by the author (.e.g,
  853.  
  854.  
  855.      Scott                                                        [Page 14]
  856.  
  857.  
  858.  
  859.  
  860.  
  861.      RFC:  NANFOR.LIB                                           April, 1991
  862.      Ver: 1.0                                          The NANFORUM Toolkit
  863.  
  864.  
  865.                "ft_setglobal()", "ft_getglobal()", and so on).  Globals
  866.                such as this shall be declared static in the .PRG that needs
  867.                them.
  868.  
  869.           5.9  Use of Macros ("&" operator)
  870.  
  871.                The use of macros in NANFOR.LIB functions will be, for the
  872.                most part, unnecessary.  Since this is a Clipper 5.0
  873.                library, the new 5.0 codeblock construct should be used
  874.                instead.  Anyone having trouble figuring out how to convert
  875.                a macro to a codeblock should post suitable questions on
  876.                NANFORUM.
  877.  
  878.           5.10 Use of Static Functions
  879.  
  880.                Any Clipper 5.0 function that is only needed within the
  881.                scope of one source file shall be declared STATIC.  This
  882.                applies mostly to NANFOR.LIB "internals" (names with an
  883.                "_ft" prefix) that user programs need not access.
  884.  
  885.           5.11 Use of SPI_ interface
  886.  
  887.                A common library of low-level routines that are useful in C
  888.                and assembler functions, called the "Shared Programming
  889.                Interface", shall be used as a practical alternative to a
  890.                compiler's standard library, where applicable.  These
  891.                functions were developed by Dirk Lesko and a consortium of
  892.                third party developers to help reduce the amount of
  893.                duplicated code pulled in by multiple libraries.
  894.  
  895.                SPI.LIB, including its source, is available as a separate
  896.                library and will always be posted wherever NANFOR.LIB is
  897.                posted.
  898.  
  899.                Use of SPI.LIB will be required if and only if SPI.LIB is
  900.                widely available in source code form so that authors may see
  901.                what functions need not be duplicated.  
  902.  
  903.           5.12 Use of DGROUP in ASM Functions
  904.  
  905.                Use of DGROUP in assembly language functions shall be
  906.                avoided, in accordance with Nantucket's recommendations.
  907.                Assembly functions written for NANFOR.LIB shall use a
  908.                segment named _NanFor, as in the following example:
  909.  
  910.  
  911.                     Public    FT_ChDir
  912.  
  913.                     Extrn     _ftDir:Far
  914.  
  915.  
  916.      Scott                                                        [Page 15]
  917.  
  918.  
  919.  
  920.  
  921.  
  922.      RFC:  NANFOR.LIB                                           April, 1991
  923.      Ver: 1.0                                          The NANFORUM Toolkit
  924.  
  925.  
  926.                     Segment   _NanFor   Word      Public    "CODE"
  927.                     Assume    CS:_NanFor
  928.  
  929.                     Proc      FT_ChDir  Far
  930.                               .
  931.                               .
  932.                               .
  933.                               Ret
  934.                     Endp      FT_ChDir
  935.                     Ends      _NanFor
  936.                     End
  937.  
  938.           5.13 Use of "Internals"
  939.  
  940.                     Use of Nantucket "internals" by code authors is
  941.                     allowed.  However, should any code make use of an
  942.                     internal, i.e., a function or variable that is not part
  943.                     of the published Clipper API, then that internal shall
  944.                     be clearly marked in the documentation (under
  945.                     "DESCRIPTION") and in the actual code, everywhere the
  946.                     internal is used.
  947.  
  948.           5.14 Procedures for compiling functions
  949.  
  950.                5.14.1    Clipper
  951.  
  952.                          Clipper functions will be compiled under the
  953.                          current release of Clipper 5.0, with the following
  954.                          compiler options:
  955.  
  956.                               /n /w /l
  957.  
  958.                          Note that neither line numbers nor debugging
  959.                          information will find its way into NANFOR.LIB, to
  960.                          keep the code size down.  End users may recompile
  961.                          NANFOR.LIB with these options enabled if they want
  962.                          to view NANFOR.LIB source in the debugger.
  963.  
  964.                5.14.2    ASM
  965.  
  966.                          Assembly functions must compile successfully 
  967.                          under any MSDOS assembler capable of producing the
  968.                          proper .OBJ file.  However, care should be taken
  969.                          not to use any macros or special syntax particular
  970.                          to one vendor's assembler, because that would make
  971.                          it difficult for end users to recompile the
  972.                          source.
  973.  
  974.                5.14.3    C
  975.  
  976.  
  977.      Scott                                                        [Page 16]
  978.  
  979.  
  980.  
  981.  
  982.  
  983.      RFC:  NANFOR.LIB                                           April, 1991
  984.      Ver: 1.0                                          The NANFORUM Toolkit
  985.  
  986.  
  987.                          C functions must compile successfully under any C
  988.                          compiler capable of interfacing to Clipper. 
  989.                          Obviously, Microsoft C, version 5.1, is the
  990.                          preferred development environment.  Care should be
  991.                          taken, when writing C code, not to use any special
  992.                          compiler features particular to one vendor's C
  993.                          compiler, because that would make it difficult for
  994.                          end users to recompile the source.
  995.  
  996.           5.15 Functions requiring other libraries
  997.  
  998.                It is very easy to write functions in C that call the   
  999.                compiler's standard C library functions.  However,
  1000.                NANFOR.LIB can make no assumptions about the end user's
  1001.                ability to link in the standard library or any other  
  1002.                library.  Therefore, no function will be added to  
  1003.                NANFOR.LIB that requires any other third party or compiler
  1004.                manufacturer's library, except for SPI.LIB, described above.
  1005.  
  1006.      6    ADMINISTRATIVE DETAILS
  1007.  
  1008.           6.1  Librarian
  1009.  
  1010.                The librarian will the person who physically creates the
  1011.                library via a library utility and uploads it to the proper
  1012.                NANFORUM library on CompuServe.  The librarian generally
  1013.                does *not* test code or edit source code to repair
  1014.                formatting errors.
  1015.  
  1016.           6.2  Documenter
  1017.  
  1018.                The documenter is responsible for maintaining the  Norton
  1019.                and/or Tom Rettig guides and keeping it in sync with each
  1020.                new release.
  1021.  
  1022.           6.3  Referees
  1023.  
  1024.                Referees are volunteers who read source code, clean it up,
  1025.                compile it, look for problems like potentially problematic C
  1026.                code, decide on which function is best, consolidate common
  1027.                functions, etc.  They make sure the header and documentation
  1028.                blocks are present.  There is no election or term for
  1029.                refereedom.  One simply performs the task as long as one can
  1030.                and bows out when necessary.
  1031.  
  1032.           6.4  Transitions
  1033.  
  1034.                Not everyone will be able to stay around forever to keep
  1035.                working on this project.  Therefore, it is the
  1036.  
  1037.  
  1038.      Scott                                                        [Page 17]
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.      RFC:  NANFOR.LIB                                           April, 1991
  1045.      Ver: 1.0                                          The NANFORUM Toolkit
  1046.  
  1047.  
  1048.                responsibility of each referee, documenter, or librarian to
  1049.                announce as far in advance as possible his or her intention
  1050.                to leave, in order to give everyone a chance to come up with
  1051.                a suitable replacement.  Don't let it die!
  1052.  
  1053.      7    CONTRIBUTORS
  1054.  
  1055.           Current contributors, directly and indirectly, to this      
  1056.           document include:
  1057.  
  1058.                Don Caton [71067,1350]
  1059.                Bill Christison  [72247,3642]
  1060.                Robert DiFalco [71610,1705]
  1061.                Paul Ferrara  [76702,556]
  1062.                David Husnian [76064,1535]
  1063.                Ted Means [73067,3332]
  1064.                Steve Kolterman [76320,37]
  1065.                Alexander Santic [71327,2436]
  1066.                Glenn Scott [71620,1521]
  1067.                Keith Wire [73760,2427]
  1068.                Craig Yellick [76247,541]
  1069.                James Zack [75410,1567]
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.      Scott                                                        [Page 18]
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.      RFC:  NANFOR.LIB                                           April, 1991
  1106.      Ver: 1.0                                          The NANFORUM Toolkit
  1107.  
  1108.  
  1109.                  APPENDIX: SAMPLE HEADER AND DOCUMENTATION BLOCK
  1110.  
  1111.                This example shows how you would set up the
  1112.                headers for either a Clipper or C source file.  
  1113.  
  1114.      /*
  1115.       * File......: PRTSCR.C
  1116.       * Author....: Ted Means [CIS: 73067,3332]
  1117.       * Date......: $Date$
  1118.       * Revision..: $Revision$
  1119.       * Log file..: $Logfile$
  1120.       * 
  1121.       * This is an original work by Ted Means and is placed in the
  1122.       * public domain.
  1123.       *
  1124.       * Modification history:
  1125.       * ---------------------
  1126.       *
  1127.       * $Log$
  1128.       *
  1129.       */
  1130.  
  1131.      /*  $DOC$
  1132.       *  $FUNCNAME$
  1133.       *     FT_PrtScr()
  1134.       *  $ONELINER$
  1135.       *     Enable or disable printscreens.
  1136.       *  $SYNTAX$
  1137.       *     FT_PrtScr( <lSetStat> ) -> <lCurStat>
  1138.       *  $ARGUMENTS$
  1139.       *     <lSetStat> set to .t. will enable printscreens, .f. will
  1140.       *     disable printscreens.
  1141.       *  $RETURNS$
  1142.       *     The current state ( .t. for enabled, .f. for disabled).
  1143.       *  $DESCRIPTION$
  1144.       *     This function is valuable if you have a need to disable the
  1145.       *     printscreen key.  It works by fooling the BIOS into thinking
  1146.       *     that a printscreen is already in progress.  The BIOS will then
  1147.       *     refuse to invoke the printscreen handler.
  1148.       *  $EXAMPLES$
  1149.       *     FT_PrtScr( .F. )       // Disable the printscreen key
  1150.       *     FT_PrtScr( .T. )       // Enable the printscreen key
  1151.       *     MemVar := FT_PrtScr()  // Get the current status
  1152.       *  $SEEALSO$
  1153.       *     ft_peek() ft_poke()
  1154.       *  $INCLUDE$
  1155.       *     prtscr.h
  1156.       *  $END$
  1157.       */
  1158.  
  1159.  
  1160.      Scott                                                        [Page 19]
  1161.